[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 bar()                   Draw and Fills a Bar

 #include   <graphics.h>

 void       far bar(l,t,r,b);
 int        l;
 int        t;
 int        r;
 int        b;

    bar() draws and fills in a rectangular bar.  The bar is drawn using
    the upper left coordinates ('l','t') and the lower right coordinates
    ('r','b').  The current fill pattern and fill color is used to fill
    in the  bar.  The bar is not outlined.

    Returns:    Nothing.

       Note:    To outline a bar, use bar3d() with a 'depth' of 0.

   -------------------------------- Example ---------------------------------

    The following statements draw three bars and fill them with different
    patterns and colors.

           #include <graphics.h>
           #include <conio.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               initgraph(&gdriver,&gmode,"");
               setfillstyle(SOLID_FILL,RED);
               bar(10,10,100,100);
               setfillstyle(HATCH_FILL,BLUE);
               bar(200,10,300,100);
               setfillstyle(LINE_FILL,YELLOW);
               bar(400,10,500,100);
               getch();
               closegraph();
           }


See Also: bar3d()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson